package com.yoyo.itravel.dao;

import com.yoyo.itravel.bean.TicketType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;
import java.util.List;

/**
 * @Description 门票类型持久层接口
 * @Author HZX
 * @Version 1.0
 * @Date 2020/6/26 11:31
 */
@Repository
public interface ITicketTypeDao {

    /**
     * @Description 查找所有的景点门票类型
     *
     * @param
     * @return java.util.List<cn.hut.travel.bean.TicketTypeDetail>
     */
    @Select("select * from tb_ticket_type")
    List<TicketType> selectAll() throws SQLException;

    /**
     * @Description 过景点id查找该景点中的所有门票类型
     *
     * @param sightId
     * @return java.util.List<cn.hut.travel.bean.TicketType>
     */
    @Select("select * from tb_ticket_type where sightId=#{sightId}")
    List<TicketType> selectBySightId(String sightId) throws SQLException;
}
